<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* div:hover{
            color: red;
            font-size: 50px;
            cursor: pointer;
        } */
        /* 兄弟元素hover 只生效跟在one 后面的兄弟元素*/
        .one:hover+.two{
            color: red;
            font-size: 50px;
        }
        .container{
            width: 200px;
            height: 200px;
            border: 1px solid red;
        }
        .box1{
            width: 50px;
            height: 50px;
            border: 1px solid purple;
        }
        .box2{
            width: 50px;
            height: 50px;
            border: 1px solid purple;
        }
        /* 父元素hover 子元素改变样式  */
        .container:hover .box2{
            color: red;
        }
    </style>
</head>
<body>

    <!-- <ul>
        <li class="one">1111</li>
        <li class="two">2222</li>
    </ul> -->

    <div class="container">
        <div class="box1">1111</div>
        <div class="box2">2222</div>
    </div>
</body>
</html>